package 集合进阶.综合练习;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;

public class 自动点名器1 {
    public static void main(String[] args) {
         /* 班级里有N个学生，学生属性:姓名，年龄，性别。
        实现随机点名器。*/


        //1.定义集合
        ArrayList<String> list = new ArrayList<>();
        //2.添加数据
        Collections.addAll(list,"范闲","范建","范统","杜子腾","杜琦燕","宋合泛","侯笼藤","朱益群","朱穆朗玛峰","袁明媛");

        //随机进行点名
       Collections.shuffle(list);
        System.out.println(list.get(0));
    }
}
